<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Template_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-template_name" data-rule="required" class="form-control" name="row[template_name]" type="text"
                   value="{$row.template_name|htmlentities}">
        </div>
    </div>
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('属性')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="tpl" data-name="row[template_json]">
                <dd>
                    <ins>{:__('标题')}</ins>
                    <ins>{:__('值')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                    {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[template_json]" class="form-control hide" cols="30" rows="5">{$row['template_json']}</textarea>
            </dl>
            <script id="tpl" type="text/html">
                <dd class="form-inline">
                    <ins>
                        <input type="text" name="<%=name%>[<%=index%>][title]" class="form-control"
                               value="<%=row.title%>" placeholder="标题" size="10"/>
                    </ins>
                    <ins style="width: calc(100% - 187px)">
                        <input type="text" name="<%=name%>[<%=index%>][value]" class="form-control"
                               value="<%=row.value%>" placeholder="例：A:选项一|选项二|选项三 或 默认值 或 不填" style="width: 100%"/>
                    </ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   disabled data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
